package com.version1.diabeco;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.version1.diabeco.service.AlarmaService;
import com.version1.diabeco.service.LocationService;

public class ServiceStartup extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {

		// BugSenseHandler.initAndStartSession(context, "4e1baf07");

		// we double check here for only boot complete event
		if (intent != null) {
			if (intent.getAction().equalsIgnoreCase(Intent.ACTION_BOOT_COMPLETED)) {

				Intent alarmServiceIntent = new Intent(context, AlarmaService.class);
				context.startService(alarmServiceIntent);

				Intent locationServiceIntent = new Intent(context, LocationService.class);
				context.startService(locationServiceIntent);

			}
		}
	}

}
